From e53027149fdc9d82eb1860a46960658bc7027f0f Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Sun, 11 Dec 2005 00:16:26 +0100 Subject: [PATCH] Fix indentation in a few places. Signed-off-by: Xin Li --- tools/python/xen/xend/image.py | 8 ++++---- xen/include/asm-x86/mm.h | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index 3e1bf8688c..b60c5f4754 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -365,13 +365,13 @@ class VmxImageHandler(ImageHandler): def getDomainMemory(self, mem): """@see ImageHandler.getDomainMemory""" - page_kb = 4 - if os.uname()[4] == 'ia64': - page_kb = 16 + page_kb = 4 + if os.uname()[4] == 'ia64': + page_kb = 16 # for ioreq_t and xenstore static_pages = 2 return mem + (self.getPageTableSize(mem / 1024) + static_pages) * page_kb - + def getPageTableSize(self, mem_mb): """Return the pages of memory needed for 1:1 page tables for physical mode. diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h index de1b22150d..bbc01dea81 100644 --- a/xen/include/asm-x86/mm.h +++ b/xen/include/asm-x86/mm.h @@ -276,7 +276,7 @@ int check_descriptor(struct desc_struct *d); #define VALID_MFN(_mfn) (!((_mfn) & (1U<<31))) #define set_mfn_from_pfn(pfn, mfn) (phys_to_machine_mapping[(pfn)] = (mfn)) -static inline unsigned long get_mfn_from_pfn(unsigned long pfn) +static inline unsigned long get_mfn_from_pfn(unsigned long pfn) { unsigned long mfn; l1_pgentry_t pte; @@ -284,11 +284,11 @@ static inline unsigned long get_mfn_from_pfn(unsigned long pfn) if ( (__copy_from_user(&pte, &phys_to_machine_mapping[pfn], sizeof(pte)) == 0) && (l1e_get_flags(pte) & _PAGE_PRESENT) ) - mfn = l1e_get_pfn(pte); + mfn = l1e_get_pfn(pte); else - mfn = INVALID_MFN; - - return mfn; + mfn = INVALID_MFN; + + return mfn; } #ifdef MEMORY_GUARD @@ -331,8 +331,8 @@ struct ptwr_info { int ptwr_init(struct domain *); void ptwr_destroy(struct domain *); void ptwr_flush(struct domain *, const int); -int ptwr_do_page_fault(struct domain *, unsigned long, - struct cpu_user_regs *); +int ptwr_do_page_fault(struct domain *, unsigned long, + struct cpu_user_regs *); int revalidate_l1(struct domain *, l1_pgentry_t *, l1_pgentry_t *); void cleanup_writable_pagetable(struct domain *d); -- 2.30.2